package com.xk857.feign;

import com.xk857.entities.Label;
import com.xk857.feign.req.UserInfoREQ;
import com.xk857.util.base.NoResult;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author CV大魔王
 * @Description 文章Feign远程调用
 * @date 2021/2/25 16:02
 */
@FeignClient(value = "xk857-article", path = "/article")
public interface IFeignArticleController {

    @ApiImplicitParam(allowMultiple = true, dataType = "String", name = "ids", value = "知识点id集合", required = true)
    @ApiOperation("Feign接口-根据知识点ids查询对应标签信息")
    @GetMapping("/pub/feign/label/list/{ids}")
    List<Label> getLabelListByIds(@PathVariable("ids") List<String> ids);


    @ApiOperation("Feign接口-更新文章表和评论表中的用户信息")
    @PutMapping("/pri/feign/article/user")
    boolean updateUserInfo(@RequestBody UserInfoREQ req);

}
